/*
package com.ruoyi.common.utils;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;

*/
/**
 * Redis工具类
 *//*

@Component
public class RedisUtils {

    @Autowired
    private RedisTemplate<String, Object> redisTemplate;

    private static final long DEFAULT_EXPIRE = 24 * 60 * 60; // 默认过期时间24小时

    */
/**
     * 设置缓存
     *//*

    public void set(String key, Object value) {
        redisTemplate.opsForValue().set(key, value);
    }

    */
/**
     * 设置缓存并指定过期时间
     *//*

    public void set(String key, Object value, long timeout, TimeUnit unit) {
        redisTemplate.opsForValue().set(key, value, timeout, unit);
    }

    */
/**
     * 设置缓存并使用默认过期时间
     *//*

    public void setWithDefaultExpire(String key, Object value) {
        set(key, value, DEFAULT_EXPIRE, TimeUnit.SECONDS);
    }

    */
/**
     * 获取缓存
     *//*

    public Object get(String key) {
        return redisTemplate.opsForValue().get(key);
    }

    */
/**
     * 删除缓存
     *//*

    public Boolean delete(String key) {
        return redisTemplate.delete(key);
    }

    */
/**
     * 判断key是否存在
     *//*

    public Boolean hasKey(String key) {
        return redisTemplate.hasKey(key);
    }

    */
/**
     * 设置过期时间
     *//*

    public Boolean expire(String key, long timeout, TimeUnit unit) {
        return redisTemplate.expire(key, timeout, unit);
    }

    */
/**
     * 获取过期时间
     *//*

    public Long getExpire(String key, TimeUnit unit) {
        return redisTemplate.getExpire(key, unit);
    }

    */
/**
     * 递增
     *//*

    public Long increment(String key, long delta) {
        return redisTemplate.opsForValue().increment(key, delta);
    }

    */
/**
     * 递减
     *//*

    public Long decrement(String key, long delta) {
        return redisTemplate.opsForValue().decrement(key, delta);
    }
}
*/
